<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:composite="http://java.sun.com/jsf/composite"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<head>
<title>Not present in rendered output</title>

</head>
<body>
	<composite:interface>
		<composite:attribute name="update" required="false" default="" />
		<composite:attribute name="render" required="false" default="" />
		<composite:attribute name="controller" required="true" />
		<composite:attribute name="dataManager" required="true" />
	</composite:interface>

	<composite:implementation>
		<ui:param name="controller" value="#{cc.attrs.controller}"/>
		<ui:param name="proveedorDataManager" value="#{cc.attrs.dataManager}"/>
		<p:panel id="pnlProveedor">
			<table class="formulario">
				<tr>
					<td width="30%"><h:outputLabel for="txtNombre"
							value="#{i18n['erp.proveedor.nombre']}" /> <h:outputLabel
							value="#{i18n['label.signo.requerido']}"
							styleClass="item-required" /></td>
					<td width="70%"><p:inputText id="txtNombre" style="width: 90%"
							required="true"
							value="#{proveedorDataManager.proveedorInstancia.provNombre}"
							label="#{i18n['erp.proveedor.nombre']}" /></td>
				</tr>
				<tr>
					<td><h:outputLabel for="txtApellido"
							value="#{i18n['erp.proveedor.apellido']}" /> <h:outputLabel
							value="#{i18n['label.signo.requerido']}"
							styleClass="item-required" /></td>
					<td><p:inputText id="txtApellido" style="width: 90%"
							required="true"
							value="#{proveedorDataManager.proveedorInstancia.provApellido}"
							label="#{i18n['erp.proveedor.apellido']}" /></td>
				</tr>
				<tr>
					<td><h:outputLabel for="txtCiRuc"
							value="#{i18n['erp.proveedor.ci']}" /> <h:outputLabel
							value="#{i18n['label.signo.requerido']}"
							styleClass="item-required" /></td>
					<td><p:inputText id="txtCiRuc" style="width: 90%"
							maxlength="13" onkeypress="return soloEnteros(this, event)"
							required="true"
							value="#{proveedorDataManager.proveedorInstancia.provDocumentoIdentificacion}"
							label="#{i18n['erp.proveedor.ci']}">
							<f:validateLength maximum="13" minimum="10" />
							<f:validator
								validatorId="ec.edu.uce.erp.web.validador.RucValidator" />
						</p:inputText></td>
				</tr>
				<tr>
					<td><h:outputLabel for="txtCiudad"
							value="#{i18n['erp.proveedor.ciudad']}" /> <h:outputLabel
							value="#{i18n['label.signo.requerido']}"
							styleClass="item-required" /></td>
					<td><p:selectOneMenu id="txtCiudad" panelStyle="width: 20%"
							required="true" label="#{i18n['erp.proveedor.ciudad']}"
							value="#{proveedorDataManager.proveedorInstancia.detCatalogoPaisCiudad}">
							<f:selectItem itemValue=""
								itemLabel="#{i18n['label.seleccione']}" noSelectionOption="true" />
							<f:selectItems
								value="#{proveedorDataManager.catalogoCiudadEcuador}" />
						</p:selectOneMenu></td>
				</tr>
				<tr>
					<td><h:outputLabel for="txtDireccion"
							value="#{i18n['erp.proveedor.direccion']}" /> <h:outputLabel
							value="#{i18n['label.signo.requerido']}"
							styleClass="item-required" /></td>
					<td><p:inputText id="txtDireccion" style="width: 90%"
							required="true"
							value="#{proveedorDataManager.proveedorInstancia.provDireccion}"
							label="#{i18n['erp.proveedor.direccion']}" /></td>
				</tr>
				<tr>
					<td><h:outputLabel for="txtTelefono"
							value="#{i18n['erp.proveedor.telefono']}" /></td>
					<td><p:inputText id="txtTelefono" style="width: 90%"
							onkeypress="return soloEnteros(this, event)" maxlength="15"
							value="#{proveedorDataManager.proveedorInstancia.provTelefono}"
							label="#{i18n['erp.proveedor.telefono']}" /></td>
				</tr>
				<tr>
					<td><h:outputLabel for="txtMail"
							value="#{i18n['label.email']}" /> <h:outputLabel
							value="#{i18n['label.signo.requerido']}"
							styleClass="item-required" /></td>
					<td><p:inputText id="txtMail" style="width: 90%"
							required="true"
							value="#{proveedorDataManager.proveedorInstancia.provEmail}"
							label="#{i18n['label.email']}">
							<f:validator
								validatorId="ec.edu.uce.erp.web.validador.EmailValidator" />
						</p:inputText></td>
				</tr>
				<tr>
					<td><h:outputLabel for="txtNotas"
							value="#{i18n['erp.proveedor.notas']}" /></td>
					<td><p:inputText id="txtNotas" style="width: 90%"
							value="#{proveedorDataManager.proveedorInstancia.provNotas}"
							label="#{i18n['erp.proveedor.notas']}">
						</p:inputText></td>
				</tr>
			</table>
		</p:panel>
		<p:panel id="pnlBotones">
			<p:commandButton id="btnGuardar" value="#{i18n['label.guardar']}"
				actionListener="#{proveedorController.registrarProveedor}"
				oncomplete="if (args &amp;&amp; !args.validationFailed) dlgNuevoProveedor.hide()"
				process="@this,pnlProveedor" update="pnlProveedor,:formProveedor:tablaProveedor,:formProveedor:pnlMessages"/>
			<p:commandButton value="#{i18n['label.cancelar']}" onclick="dlgNuevoProveedor.hide();" type="button" />
		</p:panel>
	</composite:implementation>
</body>
</html>